package com.zzyl.controller.app;

import com.zzyl.base.ResponseResult;
import com.zzyl.controller.BaseController;
import com.zzyl.dto.CustomerUserLoginDto;
import com.zzyl.service.MemberService;
import com.zzyl.vo.LoginVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AppMemberController extends BaseController {

    @Autowired
    private MemberService memberService;

    //登录
    @PostMapping("/customer/user/login")
    public ResponseResult login(@RequestBody CustomerUserLoginDto dto) {
        LoginVo loginVo = memberService.login(dto);
        return ResponseResult.success(loginVo);
    }
}
